'''
元组拆包
'''


def unpack():
    lax_coordinates = (33.9425, -118.408056)
    latitude, longitude = lax_coordinates
    print(latitude)
    print(longitude)


def exchangeVariable():
    a = 1
    b = 2
    b, a = a, b
    print(a, b)


def funParam():
    print(divmod(20, 8))
    t = (20, 8)
    print(divmod(*t))
    quotient, remainder = divmod(*t)
    print(quotient, remainder)


def funReturn():
    import os
    filepath, filename = os.path.split(r'G:\CTEX\Changes.txt')
    print(filepath, filename)


def forcorce():
    a, b, *rest = range(5)
    print(a, b, rest)
    a, b, *rest = range(3)
    print(a, b, rest)
    a, b, *rest = range(2)
    print(a, b, rest)
    *rest, a, b = range(5)
    print(rest, a, b)
    a, *rest, b = range(5)
    print(a, rest, b)


if __name__ == '__main__':
    unpack()
    exchangeVariable()
    funParam()
    funReturn()
    forcorce()
